package com.erp.gather.mapper;

import com.ruoyi.gather.api.domain.dto.ErpBrandCountDto;
import com.ruoyi.gather.api.domain.ErpCollectProductExpand;
import com.erp.gather.domain.ErpCollectProductOptimize;
import com.erp.gather.domain.vo.ErpCollectProductExpandVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 采集商品拓展;参考AE-商品：发布产品信息（aliexpress.postproduct.redefining.postaeproduct）Mapper接口
 *
 * @author erp
 * @date 2023-03-07
 */
public interface ErpCollectProductExpandMapper extends BaseMapperPlus<ErpCollectProductExpandMapper, ErpCollectProductExpand, ErpCollectProductExpandVo> {

    List<ErpCollectProductOptimize> checkOptionTagAndPic(@Param("collectProductId") String collectProductId);

    Boolean updateProductStatusById(@Param("id") Long id,
                                    @Param("collectProductId") Long collectProductId,
                                    @Param("status") Integer status);

    List<ErpCollectProductExpand> selectListByCollectProductIdList(@Param("collectProductId") String collectProductId);

    ErpCollectProductExpand selectByCollectProductId(@Param("collectProductId") Long collectProductId);

    /**
     * @Description: 查询品牌ID和对应的商品数量
     * @Author: j.zh
     * @Date: 2024/7/4
     * @return
     * @Version: 4.2.0
    **/
    List<ErpBrandCountDto> selectBrandAndProductCount();
}
